package com.fenmirs.bookmarks.mvc;

import org.apache.commons.lang3.StringUtils;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author fenmirs
 * @create 2019-05-22 10:42
 * 书签controller
 */
@RestController
public class BookmarksController {
    @Resource
    private BookmarksService bookmarksService;

    /**
     * 同步书签
     * 1. 上传
     * 2. 下载
     * @param addParam
     * @return
     */
    @PostMapping(value = "synchronizeData",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public BookmarksData synchronizeData(@RequestBody AddParam addParam){
        return bookmarksService.synchronizeData(addParam);
    }
}
